﻿using BackTask.Core.Builders;
using BackTask.DashBoard.Configurations;

namespace BackTask.DashBoard.Extensions
{
    public static class DashboardExtentions
    {
        public static TaskJobBuilder UseDashBoard(this TaskJobBuilder taskJobBuilder)
        {
            taskJobBuilder.UseTaskSettingConfiguration(new DashboardSettingConfiguration(taskJobBuilder));
            return taskJobBuilder;
        }

        public static TaskJobBuilder UseDashBoard(this TaskJobBuilder taskJobBuilder, DashboardSettingConfiguration dashboardSetting)
        {
            taskJobBuilder.UseTaskSettingConfiguration(dashboardSetting.UseTaskJobBuilder(taskJobBuilder));
            return taskJobBuilder;
        }
    }
}
